package gestIT;

import java.util.EventObject;

/**
 * Class that represent an event sent with an event. Programmers should use this class to gather information about an event, and datas that has generated it.
 * 
 * @author nicola
 *
 */
public class StateChangedEvent extends EventObject {

	private static final long serialVersionUID = 1L;

	private TmpExp sender;
	private ExpEventArgs args;
	private Token tok;
	
	/**
	 * Generic Constructor
	 * 
	 * @param source Gesture block that has generated the event
	 * @param args Arguments that has generated the event
	 * @param tok Token containing past datas
	 */
	public StateChangedEvent(TmpExp source, ExpEventArgs args, Token tok) {
		super(source);
		this.sender = source;
		this.args = args;
		this.tok = tok;
	}

	/**
	 * Getter method for getting the sender
	 * @return The TmpExp object that has generated the event
	 */
	public TmpExp getSender(){
		return sender;
	}
	
	/**
	 * Getter method for getting the args
	 * @return The ExpEventArgs object that has generated the event
	 */
	public ExpEventArgs getEventArgs(){
		return args;
	}
	
	/**
	 * Getter method for getting the token
	 * @return The Token that contains past datas
	 */
	public Token getToken(){
		return tok;
	}
}
